<template>
    <div>
        <h1>
            我的点赞
        </h1>
    </div>
</template>

<script>
export default {
    created(){
        this.getUserInfo() 
    },
    data(){
        return{
            userId :''
        }
    },
    methods:{
        test(){

        },
        getUserInfo() {
            console.log('userId1 : ' + this.userId)
            this.userId = 'test'
            this.$axios.get("http://localhost:8000/getUserInfo", {
                headers: {
                    Authorization: sessionStorage.getItem('access-admin')
                }
            }).then(res => {
                console.log('userId2 : ' + this.userId)
                console.log(res.data)
                this.userId = res.data.id;
                console.log('userId3 : ' + this.userId)
            }).catch(err => {
                console.log(err)
                this.$message.error(err.response.data.message)
            })
            console.log('userId4 : ' + this.userId)
        },
    }
}
</script>

<style>

</style>